<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>测试</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="all">
body {
	font-size: 12px;
}

.editor {
	width: 500px;
	height: 226px;
	margin: 0px auto;
	border: #FF9900 1px solid;
}

.editor iframe {
	margin: 0px;
	padding: 0px;
	width: 500px;
	height: 190px;
	border: 0px;
}

.button {
	text-align: center;
	width: 500px;
	margin: 16px auto;
}

.editor .bar {
	margin: 0px;
	padding: 0px;
	padding: 3px 6px;
	height: 20px;
	border-bottom: #FF9900 1px solid;
	font-size: 14px;
	letter-spacing: 2px;
}

.editor .bar input {
	border: #FFFFFF 1px solid;
	background-color: #F8EFD6;
	cursor: pointer;
	height: 19px;
	font-size: 12px;
}
</style>
<script type="text/javascript" src="./script/edit.js"></script>
<script type="text/javascript" language="javascript">
	function cs(type) {
		document.execCommand(type, false, null);
	}
</script>
</head>
<body contentEditable=true>
	<div class="editor">
		<div class="bar">
			<input type="button" onclick="cs('UnderLine')" value="下划线" /> <input
				type="button" onclick="cs('Bold')" value="粗体" id="Button1" /> <input
				type="button" onclick="cs('Italic')" value="斜体" /> <input
				type="button" onclick="cs('StrikeThrough')" value="消除" /> <input
				type="button" onclick="cs('Undo')" value="撤销" /> <input
				type="button" onclick="cs('Redo')" value="重做" /> <input
				type="button" onclick="cs('RemoveFormat')" value="删除格式" /> <input
				type="button" onclick="cs('RemoveParaFormat')" value="删除段落格式" />
		</div>
	</div>
	<div class="button">
		<input type="button" value="start" onclick="start()" />
	</div>
	<div class="button">
		<input type="text" value="new content" id="test" /> <input
			type="button" value="添加到编辑器" onclick="add()" />
	</div>
	<p class="precontent">在这里输入内容</p>
</body>
</html>
